package com.hl.mapper;

import com.hl.pojo.Answers;
import com.hl.pojo.Users;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface WodehuidaMapper {

    List<Answers> answersList(Integer userId);

    public List<Answers> AnswersListAll(@Param("userName") String userName, @Param("answerContent") String answerContent);

    @Delete("delete from answers where answer_id = #{answerId}")
    int deleteAnswers(Integer answerId);

    int addAnswers(Answers answers);

    @Select("select * from users")
    List<Users> searchUserList();

//    编辑答案表
    int updateUserAndAnswer(Answers answers);
//编辑用户表
    int updateUser(Users users);


}
